package com.itc.bi.service;

import com.itc.bi.vo.excelVo.ExcelDataVO;
import com.itc.bi.vo.excelVo.SubClassVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @BelongsProject: itc-airport-cloud
 * @BelongsPackage: com.itc.bi.service
 * @Author: hecaiy
 * @CreateTime: 2024-06-13  10:15
 * @Description: TODO 文件操作接口层
 * @Version: 1.0
 */
public interface ImportExcelService {

    /**
     * 上传文件，更新文件
     * @param file
     * @param sheetName
     * @param dtId
     * @return
     * @throws IOException
     */
    Boolean updateFileDataSet(MultipartFile file,String sheetName,Long dtId) throws IOException;

    /**
     * 上传文件，创建数据集，同步数据
     * @param file
     * @param sheet
     * @param dtId
     * @return
     * @throws IOException
     */
    Boolean createFileDataSet(MultipartFile file,List<String> sheet,Long dtId) throws IOException;

    /**
     * 上传文件，获取左侧树结构
     * @param file
     * @return
     * @throws IOException
     */
    ExcelDataVO getExcelImportSheetTree(MultipartFile file) throws IOException;

    /**
     * 上传文件，根据sheet获取sheet数据
     * @param file
     * @param sheetName
     * @return
     * @throws IOException
     */
    SubClassVO getExcelImportSheetData(MultipartFile file,String sheetName) throws IOException;

    ExcelDataVO importExcel(MultipartFile files,String sheetName) throws IOException;
}
